<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Console extends CI_controller {

	public function __construct(){
		parent::__construct();
	}

	public function index(){
        // die();
		$data = array();
		if($this->session->userdata('user') !== false) {
			$data['user'] = json_encode($this->session->userdata('user'));
		}
		$this->load->view('zm/console',$data);
	}

    private function _ShowType4Html($arr){
        $result = array();
        foreach ($arr as $k => $v) {
            $result[] = $k.'=>'.$v;
        }
        return $result;
    }

	public function getApis() {
        // die();
        // /秘钥(<em>1d8ded329045ded4f98c8baaa7087079</em>);<br/>
			// 规则:md5($openid."1d8ded329045ded4f98c8baaa7087079")<br/>
		$apis = array(
			array(
                'url' => 'api_rental/getActiveBannerList',
                'title' => '联想租赁-获取Banner',
                'group_name' => '联想租赁',
                'params' => array(),
                'remark' => '
					           ',
            ),
            array(
                'url' => 'api_rental/getHomeNews',
                'title' => '联想租赁-首页新闻',
                'group_name' => '联想租赁',
                'params' => array(
                ),
                'remark' => '
                ',
            ),array(
                'url' => 'api_rental/search',
                'title' => '联想租赁-搜索',
                'group_name' => '联想租赁',
                'params' => array(
									array('name' => 'content','value' => ''),
                ),
                'remark' => '
                ',
            ),
						array(
                'url' => 'api_rental/getActiveNewsList',
                'title' => '联想租赁-获取新闻列表',
                'group_name' => '联想租赁',
                'params' => array(
									array('name' => 'content','value' => ''),
                ),
                'remark' => '
									传了content，就是搜索
                ',
            ),
            array(
                'url' => 'api_rental/getActiveNews',
                'title' => '联想租赁-获取新闻详情',
                'group_name' => '联想租赁',
                'params' => array(
                  array('name' => 'news_id','value' => '1'),
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/getRegisterCode',
                'title' => '联想租赁-获取注册验证码',
                'group_name' => '联想租赁',
                'params' => array(
                  array('name' => 'customer_phone','value' => '18618419289'),
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/register',
                'title' => '联想租赁-注册',
                'group_name' => '联想租赁',
                'params' => array(
									array('name' => 'customer_phone','value' => '18618419289'),
									array('name' => 'code','value' => ''),
                  array('name' => 'customer_password','value' => '888888'),
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/login',
                'title' => '联想租赁-登录',
                'group_name' => '联想租赁',
                'params' => array(
									array('name' => 'customer_phone','value' => '18618419289'),
                  array('name' => 'customer_password','value' => '888888'),
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/logout',
                'title' => '联想租赁-退出登录',
                'group_name' => '联想租赁',
                'params' => array(
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/getForgetPasswordCode',
                'title' => '联想租赁-找回密码的验证码',
                'group_name' => '联想租赁',
                'params' => array(
									array('name' => 'customer_phone','value' => '18618419289'),
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/setForgetPassword',
                'title' => '联想租赁-找回密码',
                'group_name' => '联想租赁',
                'params' => array(
									array('name' => 'customer_phone','value' => '18618419289'),
									array('name' => 'code','value' => ''),
                  array('name' => 'customer_password','value' => '888888'),
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/getMyInfo',
                'title' => '联想租赁-得到我的信息',
                'group_name' => '联想租赁',
                'params' => array(
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/editMyInfo',
                'title' => '联想租赁-补充我的信息',
                'group_name' => '联想租赁',
                'params' => array(
									array('name' => 'customer_name','value' => '天才'),
									array('name' => 'customer_companey','value' => '天才吧'),
                  array('name' => 'customer_email','value' => 'tiancai@666.com'),
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/getChangePasswordCode',
                'title' => '联想租赁-获取修改密码的验证码',
                'group_name' => '联想租赁',
                'params' => array(
									array('name' => 'customer_phone','value' => '18618419289'),
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/changePassword',
                'title' => '联想租赁-修改密码',
                'group_name' => '联想租赁',
                'params' => array(
									array('name' => 'customer_phone','value' => '18618419289'),
									array('name' => 'code','value' => ''),
                  array('name' => 'customer_password','value' => '888888'),
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/getChangePhoneCode',
                'title' => '联想租赁-获取手机号的验证码',
                'group_name' => '联想租赁',
                'params' => array(
									array('name' => 'customer_phone','value' => '18618419289'),
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/changePhone',
                'title' => '联想租赁-修改手机号',
                'group_name' => '联想租赁',
                'params' => array(
									array('name' => 'customer_phone','value' => '18618419289'),
									array('name' => 'code','value' => ''),
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/makeRental',
                'title' => '联想租赁-提交租赁信息',
                'group_name' => '联想租赁',
                'params' => array(
									// array('name' => 'customer_rental_phone','value' => '18618419289'),
									array('name' => 'customer_rental_name','value' => '天才'),
									array('name' => 'customer_rental_companey','value' => '天才吧'),
									array('name' => 'customer_rental_position','value' => '谁是天才'),
									array('name' => 'customer_rental_email','value' => 'tiancai@666.com'),
									array('name' => 'customer_rental_contract','value' => '天才---'),
									array('name' => 'customer_rental_device_type','value' => '1'),
									array('name' => 'customer_rental_deadline','value' => '12'),
									array('name' => 'customer_rental_money','value' => '10w'),
                ),
                'remark' => '',
            ),
						array(
                'url' => 'api_rental/getRentalList',
                'title' => '联想租赁-获取租赁信息',
                'group_name' => '联想租赁',
                'params' => array(
                ),
                'remark' => '',
            ),
		);

		$this->response->setSuccess();
		$this->response->setItems($apis);
		$this->response->responseExit();
	}
}
/* End of file console.php */
/* Location: ./application/controllers/console.php */
